
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>故障排查 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    原理解析
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../principle-intro/Runtime_principle.html">
            
                <a href="../principle-intro/Runtime_principle.html">
            
                    
                    框架原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../principle-intro/Project_architectured.html">
            
                <a href="../principle-intro/Project_architectured.html">
            
                    
                    名词解释
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../principle-intro/Apk_architecture.html">
            
                <a href="../principle-intro/Apk_architecture.html">
            
                    
                    APK结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../principle-intro/File_architecture_runtime.html">
            
                <a href="../principle-intro/File_architecture_runtime.html">
            
                    
                    运行期文件结构
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../guide-for-use/">
            
                <a href="../guide-for-use/">
            
                    
                    接入指引
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../guide-for-use/guide_for_build.html">
            
                <a href="../guide-for-use/guide_for_build.html">
            
                    
                    容器接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../guide-for-use/guide_for_bundle.html">
            
                <a href="../guide-for-use/guide_for_bundle.html">
            
                    
                    bundle拆分|新建
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../update/">
            
                <a href="../update/">
            
                    
                    动态部署
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../update/principle.html">
            
                <a href="../update/principle.html">
            
                    
                    技术原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../update/guide.html">
            
                <a href="../update/guide.html">
            
                    
                    一些限制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    FAQ
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.5.1" data-path="help.html">
            
                <a href="help.html">
            
                    
                    故障排查
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >故障排查</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5E38;&#x89C1;&#x95EE;&#x9898;">&#x5E38;&#x89C1;&#x95EE;&#x9898;</h1>
<p><strong>&#x6709;&#x4EFB;&#x4F55;&#x7684;&#x5EFA;&#x8BAE;&#x548C;&#x95EE;&#x9898;&#x8BF7;&#x5728;github&#x4E0A;&#x63D0;issue&#x7ED9;&#x6211;&#x4EEC;&#xFF0C;&#x6211;&#x4EEC;&#x4F1A;&#x5C3D;&#x5FEB;&#x56DE;&#x590D;&#xFF0C;&#x540C;&#x65F6;&#x9AD8;&#x9891;&#x7684;&#x4F1A;&#x66F4;&#x65B0;&#x7684;FAQ&#x6587;&#x6863;&#x4E2D;</strong></p>
<ul>
<li><p><strong>&#x9700;&#x8981;&#x53BB;&#x9664;&#x7684;&#x539F;&#x751F;multidex&#x521D;&#x59CB;&#x5316;</strong></p>
<p> Atlas&#x5BB9;&#x5668;&#x5185;&#x90E8;&#x96C6;&#x6210;&#x4E86;multidex&#x7684;dex&#x5B89;&#x88C5;&#x529F;&#x80FD;&#xFF0C;&#x6240;&#x4EE5;&#x539F;&#x5148;multidex&#x7684;&#x521D;&#x59CB;&#x5316;&#x4EE3;&#x7801;&#x53EF;&#x4EE5;&#x7701;&#x7565;&#xFF0C;&#x4E5F;&#x4E0D;&#x9700;&#x8981;&#x6DFB;&#x52A0;multidex&#x7684;&#x4E09;&#x65B9;&#x5E93;&#x4F9D;&#x8D56;&#xFF0C;&#x9700;&#x8981;&#x4F7F;&#x7528;multidex&#x7684;&#x53EA;&#x9700;&#x8981;build.gradle&#x5185;&#x90E8;&#x5C06;multidex&#x7F6E;&#x4E3A;enable&#x5373;&#x53EF;&#xFF08;Atlas&#x5185;&#x90E8;&#x96C6;&#x6210;&#x8BE5;&#x5185;&#x5BB9;&#x4E00;&#x65B9;&#x9762;&#x662F;&#x4FBF;&#x4E8E;&#x548C;&#x5BB9;&#x5668;&#x7684;&#x517C;&#x5BB9;&#xFF0C;&#x53E6;&#x4E00;&#x65B9;&#x9762;&#x540E;&#x7EED;&#x5BB9;&#x5668;&#x4F1A;&#x4F18;&#x5316;&#x539F;&#x751F;multidex&#x5728;dalvik&#x4E0A;&#x9762;&#x7684;&#x6027;&#x80FD;&#xFF09;</p>
</li>
</ul>
<p>&gt;
<img src="help_img/multidex.png" alt="MacDown Screenshot"></p>
<ul>
<li><p><strong>ClassNotFoundException</strong></p>
<ol>
<li>Bundle&#x5982;&#x679C;&#x76F8;&#x4E92;&#x4F9D;&#x8D56;&#xFF0C;&#x5219;&#x6784;&#x5EFA;&#x8D77;&#x9700;&#x8981;&#x914D;&#x7F6E;dependency&#xFF0C;&#x5426;&#x5219;&#x8FD0;&#x884C;&#x671F;&#x4F1A;&#x65E0;&#x6CD5;&#x627E;&#x5230;&#x88AB;&#x4F9D;&#x8D56;bundle&#x5185;&#x7684;class&#xFF0C;&#x4E14;&#x4E0D;&#x652F;&#x6301;&#x4E3A;&#x4E86;&#x67E5;&#x627E;&#x6027;&#x80FD;&#xFF0C;&#x76EE;&#x524D;&#x4E0D;&#x652F;&#x6301;&#x4E8C;&#x7EA7;&#x4F9D;&#x8D56;&#xFF1A;&#x6BD4;&#x5982;A-&gt;B-&gt;C,&#x5982;&#x679C;A&#x6CA1;&#x6709;&#x663E;&#x5F0F;&#x58F0;&#x660E;&#x4F9D;&#x8D56;C&#xFF0C;&#x5219;A bundle&#x91CC;&#x9762;&#x65E0;&#x6CD5;&#x76F4;&#x63A5;&#x4F7F;&#x7528;bundle C&#x91CC;&#x9762;&#x7684;Class&#xFF0C;&#x68C0;&#x67E5;bundle&#x4F9D;&#x8D56;&#x662F;&#x5426;&#x6210;&#x529F;&#x914D;&#x7F6E;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x53CD;&#x7F16;&#x8BD1;Apk&#x7684;&#x4E3B;dex &#x67E5;&#x770B;<strong>android.taobao.atlas.framework.FrameworkProperties</strong>&#x7684;field bundleInfo&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x91CC;&#x9762;&#x8BB0;&#x5F55;&#x4E86;&#x6240;&#x6709;bundle&#x7684;&#x4F9D;&#x8D56;&#x5173;&#x7CFB;</li>
<li>&#x901A;&#x8FC7;LayoutInflater &#x81A8;&#x5316;xml&#xFF0C;&#x5219;xml&#x91CC;&#x9762;&#x5982;&#x679C;&#x7531;richview&#xFF0C;&#x5219;&#x52A1;&#x5FC5;&#x786E;&#x4FDD;LayoutInflater&#x6301;&#x6709;&#x7684;context&#x7684;classloader&#x53EF;&#x4EE5;load&#x5230;&#x8BE5;richview&#xFF0C;&#x5047;&#x8BBE;context&#x6765;&#x81EA;&#x4E8E;A bundle&#x7684;Activity&#xFF0C;&#x800C;xml&#x6765;&#x81EA;&#x4E8E;B bundle&#xFF0C;&#x5982;&#x679C;A&#x548C;B&#x6CA1;&#x6709;&#x4F9D;&#x8D56;&#x5173;&#x7CFB;&#xFF0C;&#x90A3;&#x4E48;&#x52A0;&#x8F7D;&#x4E5F;&#x80AF;&#x5B9A;&#x5931;&#x8D25;</li>
</ol>
</li>
<li><p><strong>NoClassDefFoundError</strong></p>
<p>&#x9020;&#x6210;&#x8BE5;&#x95EE;&#x9898;&#x7684;&#x539F;&#x56E0;&#x6BD4;&#x8F83;&#x591A;&#xFF0C;&#x6392;&#x67E5;&#x6B65;&#x9AA4;&#x7B2C;&#x4E00;&#x4E2A;&#x5148;&#x68C0;&#x67E5;Exception&#x7684;&#x6E90;&#x5934;&#x662F;&#x4E0D;&#x662F;ClassNotFoundException&#xFF0C;&#x7136;&#x540E;&#x53CD;&#x7F16;&#x8BD1;&#x6392;&#x67E5;&#x7C7B;&#x786E;&#x5B9E;&#x662F;&#x5426;&#x5B58;&#x5728;&#xFF1B;</p>
<p>&#x5982;&#x679C;&#x7C7B;&#x672C;&#x8EAB;&#x5B58;&#x5728;&#xFF0C;&#x9700;&#x8981;&#x5F80;&#x524D;&#x6392;&#x67E5;&#x7CFB;&#x7EDF;&#x7684;&#x8B66;&#x544A;&#x4FE1;&#x606F;&#xFF0C;&#x6BD4;&#x5982;&#x5728;Art&#x7684;&#x8BBE;&#x5907;&#x4E0A;&#x4F1A;&#x6709;class&#x88AB;reject&#x7684;warning&#x4FE1;&#x606F;&#xFF1A;
  &gt;
<img src="help_img/reject.png" alt="MacDown Screenshot"></p>
<p> &#x5728;dalvik&#x7684;&#x7CFB;&#x7EDF;&#x4E0A;&#xFF0C;&#x5219;&#x4F1A;&#x5E26;&#x6709;VFY tag&#x7684;&#x8B66;&#x544A;&#x4FE1;&#x606F;&#xFF1A;</p>
<pre><code> &gt;
</code></pre><p><img src="help_img/vfy.png" alt="MacDown Screenshot"></p>
<p>&#x4E00;&#x822C;&#x6765;&#x8BF4;&#xFF0C;&#x7531;&#x4E8E;ART&#x8BBE;&#x5907;&#x8B66;&#x544A;&#x7684;&#x4FE1;&#x606F;&#x62A5;&#x5728;dex2oat&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x6240;&#x4EE5;&#x5F80;&#x5F80;&#x4E0E;&#x53D1;&#x751F;crash&#x65F6;&#x7684;Exception&#x4FE1;&#x606F;&#x76F8;&#x9694;&#x6BD4;&#x8F83;&#x8FDC;&#xFF0C;&#x6240;&#x4EE5;&#x901A;&#x5E38;&#x9047;&#x5230;&#x8BE5;&#x7C7B;&#x95EE;&#x9898;&#xFF0C;dalivk&#x7684;&#x8BBE;&#x5907;&#x62FF;&#x6765;&#x6392;&#x67E5;&#x53EF;&#x80FD;&#x66F4;&#x80FD;&#x53D1;&#x73B0;&#x95EE;&#x9898;&#x7684;&#x539F;&#x56E0;&#x3002;&#x53E6;&#x5916;noclassdef&#x9020;&#x6210;&#x7684;&#x539F;&#x6709;&#x63A5;&#x53E3;&#x7C7B;&#x627E;&#x4E0D;&#x5230;&#xFF0C;&#x65B9;&#x6CD5;&#x4E22;&#x5931;&#xFF0C;&#x65B9;&#x6CD5;&#x53C2;&#x6570;&#x4E0D;&#x5339;&#x914D;&#xFF0C;&#x65B9;&#x6CD5;&#x5C5E;&#x6027;&#x53D8;&#x66F4;&#xFF0C;&#x6DF7;&#x6DC6;&#x7B49;&#xFF0C;&#x6240;&#x4EE5;&#x5177;&#x4F53;&#x539F;&#x56E0;&#x9700;&#x8981;&#x5229;&#x7528;&#x4E0A;&#x8FF0;warning&#x4FE1;&#x606F;&#x5E76;&#x5BF9;&#x7167;&#x53CD;&#x7F16;&#x8BD1;&#x7684;&#x4EE3;&#x7801;&#x53BB;&#x6392;&#x67E5;&#x6839;&#x672C;&#x7684;&#x539F;&#x56E0;   </p>
</li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"故障排查","level":"1.5.1","depth":2,"previous":{"title":"FAQ","level":"1.5","depth":1,"ref":"","articles":[{"title":"故障排查","level":"1.5.1","depth":2,"path":"faq/help.md","ref":"faq/help.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"faq/help.md","mtime":"2017-03-10T05:29:45.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-03-08T08:38:45.939Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

